package com.ruoyi.cat.service.impl;

import java.util.List;

import com.ruoyi.cat.domain.AdGiftImage;
import com.ruoyi.cat.mapper.AdGiftImageMapper;
import com.ruoyi.cat.service.IAdGiftImageService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 礼品图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-05
 */
@Service
public class AdGiftImageServiceImpl implements IAdGiftImageService
{
    @Autowired
    private AdGiftImageMapper adGiftImageMapper;

    /**
     * 查询礼品图片
     * 
     * @param id 礼品图片主键
     * @return 礼品图片
     */
    @Override
    public AdGiftImage selectAdGiftImageById(Long id)
    {
        return adGiftImageMapper.selectAdGiftImageById(id);
    }

    /**
     * 查询礼品图片列表
     * 
     * @param adGiftImage 礼品图片
     * @return 礼品图片
     */
    @Override
    public List<AdGiftImage> selectAdGiftImageList(AdGiftImage adGiftImage)
    {
        return adGiftImageMapper.selectAdGiftImageList(adGiftImage);
    }

    /**
     * 新增礼品图片
     * 
     * @param adGiftImage 礼品图片
     * @return 结果
     */
    @Override
    public int insertAdGiftImage(AdGiftImage adGiftImage)
    {
        adGiftImage.setCreateTime(DateUtils.getNowDate());
        return adGiftImageMapper.insertAdGiftImage(adGiftImage);
    }

    /**
     * 修改礼品图片
     * 
     * @param adGiftImage 礼品图片
     * @return 结果
     */
    @Override
    public int updateAdGiftImage(AdGiftImage adGiftImage)
    {
        return adGiftImageMapper.updateAdGiftImage(adGiftImage);
    }

    /**
     * 批量删除礼品图片
     * 
     * @param ids 需要删除的礼品图片主键
     * @return 结果
     */
    @Override
    public int deleteAdGiftImageByIds(Long[] ids)
    {
        return adGiftImageMapper.deleteAdGiftImageByIds(ids);
    }

    /**
     * 删除礼品图片信息
     * 
     * @param id 礼品图片主键
     * @return 结果
     */
    @Override
    public int deleteAdGiftImageById(Long id)
    {
        return adGiftImageMapper.deleteAdGiftImageById(id);
    }
}
